﻿using System;
namespace Kis.Xroad.Eu {
    
    
    [System.SerializableAttribute()]
    public class Simple : global::Xtee.Core.Schema.XsdInt {
        
        public Simple(int value) : 
                base(value) {
            this.Pattern = @"(5|6)";
            this.Validate();
        }
        
        public Simple(string value) : 
                base(value) {
            this.Pattern = @"(5|6)";
            this.Validate();
        }
        
        public Simple() : 
                base(new int()) {
        }
        
        public static bool TryParse(string value, out global::Kis.Xroad.Eu.Simple result) {
            try {
                result = new global::Kis.Xroad.Eu.Simple(value);
                return true;
            }
            catch (System.Exception ) {
                result = null;
                return false;
            }
        }
        
        public static implicit operator Int32 (Simple value) {
            return value.Value;
        }
        
        public static implicit operator Simple (int value) {
            return new Simple(value);
        }
    }
}
